<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    {# 获取变量长度 #}
{#    <p>hello: {{ world|length}}</p>#}

    {#  截取指定个数的值词  #}
{#    <p>{{value|truncatewords:3}}</p>#}

    {#  返回指定键的排序列表  #}
{#    <p>hello:{{value|dictsort:"num"}}</p>#}

    {#  根据num的值，循环依次遍历  #}
{#    {% for book in value|dictsort:"num" %}#}
{#    <p>{{ book.name }}</p>#}
{#    {% endfor %}#}


{#  给变量值加"n"  #}
<p>{{ value|add:list2}}</p>

</body>
</html>